<template>
	<view style="width: 100%;height: 100%;">
		<view class="card-title">
			生产任务信息
		</view>
		<view class="card-content" style="height: 90%;overflow: auto;">
			<view class="infos-detail">
				<text class="infos-key">任务号:</text>
				<text class="infos-value">{{ workLineDetail.workorderCode }}</text>
			</view>
			<view class="infos-detail">
				<text class="infos-key">项目号:</text>
				<text class="infos-value">{{ workLineDetail.projectCode }}</text>
			</view>
			<view class="infos-detail">
				<text class="infos-key">总产量KG:</text>
				<text class="infos-value">{{ workLineDetail.totalWeight  }}</text>
			</view>

			<view class="infos-detail">
				<text class="infos-key">最终交期:</text>
				<text class="infos-value">{{ workLineDetail.requestDate }}</text>
			</view>
			<view class="infos-detail">
				<text class="infos-key">最终预期:</text>
				<text class="infos-value">{{ workLineDetail.preInstallationTime  }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: 'proTaskInfo',
		props: {
			currentProps: {
				type: Object,
				default: null
			}

		},
		data() {
			return {
				workLineDetail: {
					workorderCode: "",
					projectCode: "",
					totalWeight: "",
					requestDate: "",
					preInstallationTime: "",
				}
			}
		},
		created() {
			console.log('生产任务的create', this.currentProps)
			this.getWorkOrder()
		},
		methods: {
			getWorkOrder() {
				if (this.currentProps && this.currentProps.releaseOrderId) {
					this.$u.api.selectByReleaseOrderId(this.currentProps.releaseOrderId).then(res => {

						this.workLineDetail = res.data
						console.log('获取订单详情', this.workLineDetail)


					})
				}

			},
		}
	}
</script>

<style lang="scss" scoped>
	::v-deep .card-title {
		line-height: 30px;
		position: relative;
		padding-left: 20px;
		font-size: 14px;
		font-weight: 600;
		font-style: italic;
		color: #ffaa00;
		border-bottom: 1px solid #e4e7ed;
	}

	.card-content {
		// position: relative;
		display: flex;
		flex-direction: column;
		width: 100%;
		height: 100%;
		align-items: center;
		flex-direction: column;
		margin: 10px;

	}

	.infos-detail {
		display: flex;
		width: 100%;
		line-height: 30px;
		// padding: 0 100px;

		font-size: 27rpx;

		.infos-key {
			flex: 0 0 40%;
			text-align: left;
		}

		.infos-values {
			flex: 1;
			text-align: right;
			margin-right: 100rpx;
		}
	}
</style>